/**********************************
 * @Author: Ronnie Zhang
 * @LastEditor: Ronnie Zhang
 * @LastEditTime: 2023/12/05 21:29:51
 * @Email: zclzone@outlook.com
 * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
 **********************************/

import { request } from '@/utils'

export default {
  read: (params = {}) => request.post('/system/goods/page', { ...params }),
  goodsExport: () => request.get('/system/goods/export2'),
  goodsSaveOrUpdate: (params = {}) => request.post('/system/goods/saveOrUp', { ...params }),
  goodsTagList: () => request.post('/system/goods/tag/list', {}),
  goodsBindTags: (tagId, goodsTagRelList) => request.post(`/system/goods/bind/tags/${tagId}`, goodsTagRelList),
  goodsTypeList: () => request.get('/system/goods/type/list'),
  goodsAttrList: id => request.get(`/system/goodsAttr/list/${id}`),
  addOrUpdateAttr: (params = {}) => request.post(`/system/goodsAttr/addOrUpdate/`, { ...params }),
  deleteAttr: (params = {}) => request.post(`/system/goodsAttr/del/`, { ...params }),
}
